package com.google.code.UtopiaXml;

/**
 * Interface representing single property(attribute) of a class.
 *
 * @author Michael Simacek
 */
public interface Property {

    /**
     * Generates declaration of the property
     *
     * @param cb CodeBuilder to append code
     */
    public void generateDeclaration(CodeBuilder cb);

    /**
     * Generates accessor methods
     *
     * @param cb CodeBuilder to append code
     */
    public void generateAccessors(CodeBuilder cb);

    /**
     * Returns name of the property.
     *
     * @return property name
     */
    public String getName();

    /**
     * Returns type of the property
     *
     * @return property type
     */
    public Type getType();
}
